Methods and apparatus for performing tone mapping on high dynamic range images

ABSTRACT

Methods, apparatus, and computer-readable storage media for tone mapping High Dynamic Range (HDR) images. The HDR image is separated into luminance and color. Luminance is processed according to the parameters to obtain a base layer and a detail layer. The base layer is compressed into a lower dynamic range and the detail layer is adjusted according to the parameters. The compressed base layer, the detail layer, and the color component may be output as separate layers, and various image processing tools and techniques may be applied to the component layers separately to modify the layer(s). One or more tone-mapped images may be generated by merging the modified layers. Thus, each layer of the tone-mapped image may be processed separately using various image processing tools or techniques to modify the output of the tone mapping technique in a wide variety of ways.

This application is a continuation-in-part of U.S. patent application Ser. No. 12/695,100 entitled “Methods and Apparatus for Tone Mapping High Dynamic Range Images” filed Jan. 27, 2010, now U.S. Pat. No. 8,831,340 the content of which is incorporated by reference herein in its entirety.

BACKGROUND

High Dynamic Range (HDR) Imaging

The amount of variation of light in the world is huge. Normal objects in sunlight and in a shadow often differ in brightness by a factor of 10,000 or more. Objects deep in a room, seen through a small window from outside, can be very dark compared to the outside wall of the house illuminated by direct sunlight. Such environments are difficult to capture, for example, in 8-bit images, which provide a pixel brightness range of only 0 to 255, or even in 10- or 12-bit images as captured by most conventional digital cameras. Conventional film cameras have a slightly higher, but nonlinear, range. However, conventional film scanning techniques are generally limited to less than 16-bit (for example, 10-bit or 12-bit); thus, digitizing conventional film limits the dynamic range.

High dynamic range imaging (HDRI, or just HDR) allows a greater dynamic range of luminance between light and dark areas of a scene than conventional imaging techniques. An HDR image more accurately represents the wide range of intensity levels found in real scenes. Pixel values of digital HDR images thus require more bits per channel than conventional images. An HDR imaging technique may, for example, use 16-bit or 32-bit floating point numbers for each channel to capture a much wider dynamic range of luminance than is captured using standard imaging techniques.

HDR images may, for example, be generated by capturing multiple images at different exposures (e.g., using different F-stops and/or shutter speeds) with a conventional camera, and then combining the image data from the multiple images into a single HDR image. HDR images are not directly displayable to a display device or printable; the information stored in HDR images corresponds to the physical values of luminance. In contrast, the information stored in standard digital images represents colors that should appear on a display device or a paper print, and has a more limited dynamic range. Thus, to view a scene captured in a HDR image, the HDR image may be converted via some technique that approximates the appearance of high dynamic range in a standard digital image, for example an RGB image.

Tone Mapping

Tone mapping is a technique that may be used in image processing and computer graphics to map a set of colors to another set of colors. For example, tone mapping may be used to approximate the appearance of high dynamic range (HDR) images in media with a more limited dynamic range. Conventional methods of tone mapping HDR images may include decomposing an image into a base layer, detail layer, and color layer. In general, the base layer encodes large-scale variations in contrast, while the detail layer encodes fine changes in contrast (i.e., detail). The base layer is then compressed to the lower dynamic range of the output medium by multiplying all values of the base layer by a scaling factor. The detail layer then added back into the base layer. However, in compressing the base layer, these conventional methods use a single, linear scaling factor that distributes the values across the entire range of the output medium. For example, if the range of the output medium is 0 . . . 255, a scaling factor will be used that distributes the compressed values from the base layer from 0 to 255. However, this conventional technique tends to clip details of the scene.

SUMMARY

Various embodiments of methods, apparatus, and computer-readable storage media for performing tone mapping on High Dynamic Range (HDR) images are described. A tone mapping workflow is described in which values for one or more parameters of a tone mapping technique to be applied to an HDR image are obtained, for example via a user interface. In the tone mapping technique, the HDR image is separated into luminance and color. Luminance is processed according to the parameters to obtain a base layer and a detail layer. The base layer is compressed into a lower dynamic range and the detail layer is adjusted according to the parameters. The compressed base layer, the detail layer, and the color component may be used to generate output at the lower dynamic range. A nonlinear remapping function may be used to compress the base layer that leaves space at the top of the dynamic range for the adjusted detail layer.

In embodiments of a tone mapping workflow, as an alternative to generating output by combining the compressed base layer, the detail layer, and the color component to generate a tone-mapped output image, the compressed base layer, the adjusted detail layer, and the color component may each be output as a separate layer. The separate layers may be displayed individually or together on a user interface. In some embodiments, the component layers may be stacked on the user interface, with the base layer on bottom, and next the detail layer, with the color layer on top. One or more user interface elements may be provided for applying various image processing tools or techniques to the component layers separately, as desired, to modify the layer(s). A tone-mapped image may be generated by merging two or more of the layers. In addition, additional layers may be added to the layer stack, layer masks may be added, and so on, with each layer separately modifiable. Thus, the user can process each layer of a tone mapped image separately using any tool or technique provided by the image processing application, thereby being able to creatively modify the output of the tone mapping technique in a wide variety of ways.

In at least some embodiments, the compressed base layer, the detail layer, and the color layer may be displayed individually or as a layer stack in an interface of an image processing application. Each layer in the layer stack is selectable via the interface to apply one or more of a plurality of image processing techniques provided by the application to the selected layer. The user may select a layer in the stack via the interface to apply one or more of a plurality of image processing techniques provided by the image processing application to the selected layer. The user may perform other modifications to the stack, such as adding layers or layer masks and/or combining layers in the stack. When the user is done with the modifications, the layers in the stack may be combined to generate an output image at the dynamic range of the output medium, if desired. In at least some embodiments, the layers in the stack may be persisted so that the user can perform additional modifications to affect the output image as desired.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a block diagrams that illustrates data flow and processing in a method for tone mapping High Dynamic Range (HDR) images according to some embodiments.

FIG. 1B is a block diagram that illustrates the compress base layer component of FIG. 1A in more detail, according to some embodiments.

FIG. 2 is a graph showing several curves each corresponding to a different value for h in a remapping function used in some embodiments, shown on a 0-1 scale on both axes for illustrative purposes.

FIG. 3 graphically illustrates an example of a dynamic range divided into a lower portion and an upper portion according to some embodiments.

FIG. 4 is a flowchart illustrating a method for tone mapping High Dynamic Range (HDR) images according to some embodiments.

FIG. 5 shows an example user interface to a tone mapping module that implements a method for tone mapping HDR images as described in FIGS. 1A through 4.

FIG. 6 illustrates a tone mapping module that may implement an embodiment of the method for tone mapping HDR images as illustrated in FIGS. 1A through 5.

FIGS. 7A through 7C show a workflow for applying the tone mapping technique as illustrated in FIGS. 1A through 6 to an input HDR image, according to at least some embodiments.

FIG. 8 is a flowchart of a method for displaying and modifying the component layers as separately output by the tone mapping technique, according to at least some embodiments.

FIG. 9 shows an example user interface that may be used in performing the tone mapping workflow illustrated in FIGS. 7A through 7C, according to at least some embodiments.

FIG. 10 shows an example user interface that may be used to display and modify the component layers as separately output by the tone mapping technique according to at least some embodiments.

FIG. 11 illustrates an example computer system that may be used in embodiments.

While the invention is described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the invention is not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention. The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description. As used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to.

DETAILED DESCRIPTION OF EMBODIMENTS

In the following detailed description, numerous specific details are set forth to provide a thorough understanding of claimed subject matter. However, it will be understood by those skilled in the art that claimed subject matter may be practiced without these specific details. In other instances, methods, apparatuses or systems that would be known by one of ordinary skill have not been described in detail so as not to obscure claimed subject matter.

Some portions of the detailed description which follow are presented in terms of algorithms or symbolic representations of operations on binary digital signals stored within a memory of a specific apparatus or special purpose computing device or platform. In the context of this particular specification, the term specific apparatus or the like includes a general purpose computer once it is programmed to perform particular functions pursuant to instructions from program software. Algorithmic descriptions or symbolic representations are examples of techniques used by those of ordinary skill in the signal processing or related arts to convey the substance of their work to others skilled in the art. An algorithm is here, and is generally, considered to be a self-consistent sequence of operations or similar signal processing leading to a desired result. In this context, operations or processing involve physical manipulation of physical quantities. Typically, although not necessarily, such quantities may take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared or otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to such signals as bits, data, values, elements, symbols, characters, terms, numbers, numerals or the like. It should be understood, however, that all of these or similar terms are to be associated with appropriate physical quantities and are merely convenient labels. Unless specifically stated otherwise, as apparent from the following discussion, it is appreciated that throughout this specification discussions utilizing terms such as “processing,” “computing,” “calculating,” “determining” or the like refer to actions or processes of a specific apparatus, such as a special purpose computer or a similar special purpose electronic computing device. In the context of this specification, therefore, a special purpose computer or a similar special purpose electronic computing device is capable of manipulating or transforming signals, typically represented as physical electronic or magnetic quantities within memories, registers, or other information storage devices, transmission devices, or display devices of the special purpose computer or similar special purpose electronic computing device.

Various embodiments of methods, apparatus, and computer-readable storage media for tone mapping High Dynamic Range (HDR) images are described. In embodiments, an input HDR image I is separated into a luminance component L and a color component C. Only the luminance component L is modified. The luminance component may be processed using a bilateral filter to obtain a base layer B and a detail layer D. In general, the base layer encodes large-scale variations in contrast, while the detail layer encodes fine changes in contrast (i.e., detail). Both layers may be transformed: B is compressed to reduce the dynamic range, while D may be amplified to reveal the image details. Compression, in this usage, refers to remapping the values of the pixels of the HDR image to the lower dynamic range of the pixels of an output image, for example an 8-bit, 3-channel RGB image, for which the dynamic range is 0 . . . 255.

In embodiments, the detail layer D is analyzed to estimate how much space is needed for D in the lower dynamic range to which the HDR image I is being remapped. The highlights of the base layer B are then compressed using a non-linear remapping function that leaves space at the top of the range according to the estimation. For example, in a dynamic range of 0 . . . 255, the top of the range to which the base layer is compressed may be 240, 250, or some other value based upon the estimation. A remapping function is applied to the base layer B shadows. The detail layer D is appropriately adjusted, and the compressed base layer and adjusted detail layer are combined into an output luminance. Color C and the output luminance are then appropriately recombined to generate an output, lower dynamic range image.

Thus, embodiments employ a base layer compression technique that analyzes the details and compresses the base layer based on the analysis to provide space at the top of the intensity scale where the details and variations are displayed to thus generate output images that are visually better, particularly in regards to details, than images generated using conventional tone mapping techniques applied to HDR images which employ a linear scaling factor that tends to flatten the details.

Some embodiments may provide a user interface that includes user interface elements via which a user may control one or more parameters of the tone mapping method, for example implemented in a tone mapping module. An example user interface is shown in FIG. 5. The user interface may provide user interface elements to control one or more of the following parameters, and/or other parameters not listed here.

-   -   Glow extent and amplitude (or strength): These two parameters         affect the bilateral filter and control the size and strength of         the glows (a.k.a. halos) that may be visible around contrasted         edges.     -   Contrast: controls the dynamic range of the output, that is, the         difference of the brightest and darkest points.     -   Highlight: brightens or darkens the bright regions of the         images.     -   Shadow: brightens or darkens the dark regions of the images.     -   Exposure: globally scales up or down the image intensities.     -   Detail: controls the amplitude of the texture.     -   Saturation: controls the saturation of the colors.

In some embodiments, default values may be used for the various parameters that attempt to produce images that look as much as possible like normal photographs. However, via the user interface, users may modify one or more of the parameters to obtain an “HDR look” (glowing edges, low contrast, and saturated colors) in images, for example by increasing the glow extent and amplitude, reducing the contrast, and increasing saturation and texture, or may modify one or more parameters to achieve various other desired visual effects.

Embodiments of the method for tone mapping High Dynamic Range (HDR) images as described herein may be implemented as or in a tone mapping module. Embodiments of the tone mapping module may, for example, be implemented as a stand-alone image processing application, as a module of an image processing application, as a plug-in for applications including image processing applications, and/or as a library function or functions that may be called by other applications. Embodiments of the tone mapping module may be implemented in any image processing application, including but not limited to Adobe® PhotoShop® Adobe® PhotoShop® Elements®, and Adobe® After Effects®. An example tone mapping module is illustrated in FIG. 6. An example system on which a tone mapping module may be implemented is illustrated in FIG. 11.

While embodiments are described in reference to tone mapping HDR images to generate output images of a lower dynamic range, the method of separating luminance into a base layer and a detail layer, compressing the base layer using a non-linear remapping function to leave room at the high end of the range for the details, and recombining the compressed base layer and detail layer may be applied in various other image processing tasks in which luminance needs to be compressed. The tone mapping methods may be applied to both color and grayscale HDR images. In addition, the tone mapping methods may be applied to other types of images than HDR images, such as low dynamic range images. To apply the methods described herein to low-dynamic range images (e.g., 8- or 16-bit images), in some embodiments, one or more 8- or 16-bit images may be converted into a 32-bit image, and the tone mapping methods described herein may then be applied to the 32-bit image.

FIGS. 1A and 1B—Block Diagrams of a Method for Tone Mapping HDR Images

FIGS. 1A and 1B are block diagrams that illustrate data flow and processing in a method for tone mapping High Dynamic Range (HDR) images according to some embodiments. FIG. 1A is a high-level view of the process. In FIG. 1A, an input HDR image I 100 is separated, at 102, into a luminance component L 104 and a color component C 106. Only the luminance component L 104 is modified. At 108, the luminance component may be decomposed, for example using a bilateral filter, to obtain a base layer B 110 and a detail layer D 114. In general, the base layer encodes large-scale variations in contrast, while the detail layer encodes fine changes in contrast (i.e., detail). Both layers may be transformed: base layer B 110 is compressed at 112 using a base layer compression technique described below that reduces the dynamic range, while detail layer D 114 may be adjusted at 116, for example D may be amplified to more clearly reveal the image details. Compressed base layer B 110 and adjusted detail layer D 114 may then be combined at 118 to generate L_(out) 120. Exposure may be adjusted for L_(out) at 122 to generate L_(exp) 124. L_(exp) 124 and color C 106 may then be combined at 126 to generate the output image I_(out) 130.

FIG. 1B shows the compress base layer 112 component of FIG. 1A in more detail, according to some embodiments. The dynamic range of the input image is estimated at 140. This provides information (e.g., maximum and minimum values) so that the compression process knows the scale of the input and thus how much to compress. At 142, a nonlinear remapping function, for example as described later in this document, is applied to compress highlights of the base layer B 110. This remapping function leaves appropriate space at the top of the range for detail D 114, once appropriately adjusted. At 144, a remapping function is applied to control shadows of the base layer B 110. At 146, a function may be applied that controls the contrast of the base layer. A compressed base layer 150 is output.

The following describes various elements of data flow and processing as illustrated in FIGS. 1A and 1B in more detail.

Color-Luminance Separation

In FIG. 1A, an input HDR image I 100 is separated, at 102, into a luminance component L 104 and a color component C 106. To perform color-luminance separation, some embodiments may separate the input image I into its luminance L and its color C=(C_(r),C_(g),C_(b)) as follows:

Luminance L may be defined as a linear combination of the RGB channels of I=(I_(r),I_(g),I_(b)):

$\begin{matrix} {L = \frac{{20I_{r}} + {40I_{g}} + I_{b}}{61}} & (1) \end{matrix}$

Color C may be defined as the ratio I/L:

$\begin{matrix} {C = {\left( {C_{r},C_{g},C_{b}} \right) = {\frac{I}{L} = \left( {\frac{I_{r\;}}{L},\frac{I_{g}}{L},\frac{I_{b}}{L}} \right)}}} & (2) \end{matrix}$

Other embodiments may use other techniques or formulas, or variations of those given above, to separate color and luminance.

Base-Detail Separation

At 108 of FIG. 1A, luminance L is decomposed into a base layer B and a detail layer D. In general, the base layer encodes large-scale variations in contrast, while the detail layer encodes fine changes in contrast (i.e., detail). In some embodiments, to decompose L into a base layer B and a detail layer D, the base layer may be computed using a bilateral filter bf applied to the logarithm of the luminance L: B=bf(ln L)  (3)

In some embodiments, the space parameter σ_(s) of the bilateral filter depends on the image size: σ_(s)=0.03 min(width,height)  (4)

In some embodiments, the range parameter σ_(r) may be set to a default value. In some embodiments, σ_(r) is set by default to 0.25.

In some embodiments, the user may control σ_(s) and σ_(r) via user interface elements, for example sliders, which may for example be named “glow extent” and “glow amplitude” or similar.

In some embodiments, detail D may be the residual of the bilateral filter. D=ln L−B  (5)

Other embodiments may use other techniques or formulas, or variations of those given above, to decompose luminance into a base layer B and a detail layer D.

Compressing the Base Layer

At 112 of FIG. 1A, base layer B 110 is compressed using a base layer compression technique that reduces the dynamic range. FIG. 1B shows element 112 of FIG. 1A in more detail.

Estimating the Dynamic Range

As indicated at 140 of FIG. 1B, embodiments may estimate the dynamic range of the input image, that is, the maximum brightness B_(max) and minimum brightness B_(min). Some embodiments may use percentiles p_(n) %, where p_(n) % is such that there is n % of the image values below or above, to clip some pixels. The following gives example values for n; these values are not intended to be limiting: B _(min) =p _(0.25%)(B) B _(max) =p _(99.75%)(B) ΔB=B _(max) −B _(min)  (6)

The example values for n % given above effectively clip 0.25% of pixels at the top and bottom of the dynamic range. This, for example, clips outlier pixels, such as single pixels that are extremely bright, from the range. Some embodiments may provide a user interface element that allows the user to adjust the percentiles used for B_(max) and/or B_(min).

Other embodiments may use other techniques or formulas, or variations of those given above, to estimate the dynamic range.

Compressing Highlights

As indicated at 142 of FIG. 1B, the highlights are compressed. Some embodiments may use a remapping function that is smooth and that decreases the intensity of the bright pixels of the base layer B while leaving the dark pixels unchanged. In some embodiments, the remapping function may be based on the following function:

$\begin{matrix} {{f\left( {x,h} \right)} = \left\{ \begin{matrix} h & {{{if}\mspace{14mu} x} = 0} \\ x & {{{if}\mspace{14mu} h} = 0} \\ \frac{x}{1 - {\exp\left( {{- x}/h} \right)}} & {{{if}\mspace{14mu} h} < 0} \\ {{2x} - \frac{x}{1 - {\exp\left( {x/h} \right)}}} & {otherwise} \end{matrix} \right.} & (7) \end{matrix}$

The first variable x is the remapped value; the h variable controls how much the bright pixels are darkened. For instance, h=0 leaves no space at the top of the intensity scale, that is, all the details in the highlights are clipped, while h=−0.5 lowers the intensity of the bright pixels of 0.5 log-luminance units so that highlight details up to 0.5 log-luminance units appear. Using this function, some embodiments may remap the base value of a given pixel x as follows: B _(h)(x)=B _(min) +f(B(x)−B _(max) ,h)−f(−ΔB,h)  (8) where h is a user-controlled parameter that controls the brightness of the highlight areas. In some embodiments, h may be expressed in log-luminance units. This nonlinear remapping function leaves space at the top of the dynamic range for the details, which are recombined with the compressed layer in a later step described below.

FIG. 2 is a graph showing several curves each corresponding to a different value for h in Equation (7), shown on a 0-1 scale on both axes for illustrative purposes. Note that, as h approaches 0, the curve approaches a straight line where 0 maps to 0, 0.5 maps to 0.5, and 1 maps to 1. As h increases in absolute magnitude, the curve drops significantly at the high range, is not affected much at all at the low range, and is moderately affected in the middle range. The drop at the high range graphically illustrates the space at the top of the dynamic range that the remapping function given in equation (8) leaves for the details.

FIG. 3 graphically illustrates an example of a dynamic range divided into a lower portion and an upper portion according to some embodiments. In this example, a dynamic range of 0 . . . 255 is shown. The top of the lower portion of the range to which the base layer is compressed is 240. The upper portion of the range (241-255) is the space in the lower dynamic range for the uncompressed details from the HDR image.

To ensure that the image details in the highlight areas are not clipped, some embodiments may set h in equation (8) to a default value, which may for example be defined as follows: h _(def) =−p _(97.5%)(D)  (9)

Some embodiments may provide a user interface element that allows the user to adjust h in equation (8). In some embodiments, instead of controlling h directly, a user may control the percentile value shown in equation (9) via the user interface. That is, a value v, controlled via a user interface element such as a slider, may be used to set h=−p _(v %)(D) This allows for the highlight user interface element to depend on the actual setting of the bilateral filter and on the image being processed.

Other embodiments may use other techniques or formulas, or variations of those given above, to compress the highlights of the base layer so as to leave room at the top of the range for the luminance details. For example, in some embodiments, as an alternative to equations (7) and (8), the following may be used to remap pixels:

Δ = B_(ma x) − B_(m i n) $\alpha = \frac{\left( {x - B_{m\; i\; n}} \right)}{\Delta}$ if  (α < t) B_(h)(x) = x else $\beta = \frac{\left( {\alpha - t} \right)}{1 - t}$ ${B_{h}(x)} = {x + {\left( {1 - {\cos\left( {\beta*\frac{\pi}{2}} \right)}} \right)*h}}$ end  if where h is a user-controlled parameter that controls the brightness of the highlight areas, and t is a threshold value. For example, t may be 0.75, but other values may be used. In some embodiments, t may be specified by the user. Controlling Shadows

As indicated at 144 of FIG. 1B, a remapping function may be applied to control shadows of the base layer B 110. Some embodiments may use a similar approach as that described above for compressing highlights to control the darkness of shadows. In some embodiments, the remapping for shadow control may be based on the following function:

$\begin{matrix} {{g\left( {x,h} \right)} = \left\{ \begin{matrix} {2h} & {{{if}\mspace{14mu} x} = 0} \\ x & {{{if}\mspace{14mu} h} = 0} \\ \frac{2x}{1 - {\exp\left( {{- x}/h} \right)}} & {{{if}\mspace{14mu} h} > 0} \\ {{3x} - \frac{x}{1 - {\exp\left( {x/h} \right)}}} & {otherwise} \end{matrix} \right.} & (10) \end{matrix}$ where x is the remapped value, while h controls how much the dark pixels are brightened. For example, h=0 leaves the shadows unchanged, while h=0.5 brightens the shadow by one log-luminance unit (the effect is twice the value of h). Some embodiments may use this function to remap the value B_(h) for a pixel x as follows: B _(hs)(x)=g(B _(h)(x)−B _(min) ,s)−g(ΔB+h,s)+B _(max) +h−f(−ΔB,h)  (11) where s controls the darkness of the shadows. In some embodiments, s is set to 0 by default. Some embodiments may provide a user interface element that allows the user to adjust s in equation (11).

Other embodiments may use other techniques or formulas, or variations of those given above, to control the shadows. For example, in some embodiments, the following may be used to control shadows instead of equations (10) and (11):

Δ = B_(ma x) − B_(m i n) $\alpha = \frac{\left( {x - B_{m\; i\; n}} \right)}{\Delta}$ if  (α > t) B_(h)(x) = x else $\beta = \frac{\left( {t - \alpha} \right)}{t}$ ${B_{h}(x)} = {x + {\left( {1 - {\cos\left( {\beta*\frac{\pi}{2}} \right)}} \right)*h}}$ end  if where h is a user-controlled parameter that controls the brightness of the highlight areas, and t is a threshold value. For example, t may be 0.5, but other values may be used. In some embodiments, t may be specified by the user. Controlling the Contrast

As indicated at 146 of FIG. 1B, a function may be applied to control the contrast of the base layer. In some embodiments, the contrast of the base layer may be controlled via a contrast parameter in the following function:

$\begin{matrix} {{B_{hsc}(x)} = {{B_{hs}(x)}\;\frac{\ln({contrast})}{\Delta\; B}}} & (12) \end{matrix}$

In some embodiments, the default value of the contrast parameter is 125. Some embodiments may provide a user interface element that allows the user to adjust the contrast parameter.

Other embodiments may use other techniques or formulas, or variations of those given above, to control the contrast.

Adjusting the Detail Layer

As indicated at 116 of FIG. 1A, the detail layer may be adjusted. In some embodiments, the amount of detail visible in the image may be controlled via a texture scaling factor: D _(t)(x)=texture×D(x)  (13)

In some embodiments, the texture scaling factor is set by default to 1.2. Some embodiments may provide a user interface element that allows the user to adjust the texture scaling factor.

Other embodiments may use other techniques or formulas, or variations of those given above, to adjust the detail layer.

Recomposing the Image

Combining Base and Detail Layers

As indicated at 118 of FIG. 1A, the compressed base layer and adjusted detail layer may be combined to generate L_(out) 120. In some embodiments, the output luminance layer L_(out) 120 may be obtained by adding the compressed base layer and adjusted detail layer and inverting the logarithm: L _(out)=exp(B _(hsc) +D _(t))  (14)

As previously noted, the base layer compression technique used in embodiments leaves space at the high end of the dynamic range for the luminance details; D_(t) goes into this space.

Other embodiments may use other techniques or formulas, or variations of those given above, to combine the compressed base layer and adjusted detail layer.

Adjusting the Exposure

As indicated at 122 of FIG. 1A, exposure may be adjusted for L_(out) 120 to generate L_(exp) 124. In some embodiments, exposure adjustment may be performed via an exposure scaling factor. In some embodiments, the default value of the exposure scaling factor is 1: L _(exp)=exposure×L _(out)  (15)

Some embodiments may provide a user interface element for adjusting the exposure scaling factor. In some embodiments, an exposure adjustment user interface element, e.g. a slider, may be expressed in stops; that is, the user interface element value corresponds to log₂(exposure).

Other embodiments may use other techniques or formulas, or variations of those given above, to adjust the exposure of L_(out) 120.

Putting Back the Color

As indicated at 126 of FIG. 1A, L_(exp) 124 and color C 106 may be combined to generate the output image I_(out) 130. In some embodiments, the values (e.g., RGB values) may be obtained by multiplying back the color ratios C to L_(exp): I _(out) =L _(exp) ×C  (16)

This produces the final image I_(out) 130. In some embodiments, the values (e.g., RGB values) are linear, i.e. are not gamma-corrected.

Other embodiments may use other techniques or formulas, or variations of those given above, to combine output luminance and color to generate a tone mapped output image.

Adjusting the Saturation

In some embodiments, color saturation may be adjusted using a saturation tool based on a YCC color space. YCC color space is also referred to as YCbCr color space, where Y is the luma component and Cb and Cr are the blue-difference and red-difference chroma components. Other embodiments may use other techniques to adjust the saturation.

FIG. 4—Flowchart of a Method for Tone Mapping HDR Images

FIG. 4 is a flowchart illustrating a method for tone mapping High Dynamic Range (HDR) images according to some embodiments. The method shown in FIG. 4 may be used in conjunction with embodiments of the computer system shown in FIG. 11, among other devices. In various embodiments, some of the method elements shown may be performed concurrently, in a different order than shown, or may be omitted. Additional method elements may also be performed as desired. Any of the method elements described may be performed automatically (i.e., without user intervention). As shown, this method may operate as follows.

As indicated at 300, an input HDR image is separated into luminance L and color C. As indicated at 302, L is decomposed into a base layer B and a detail layer D.

Elements 304 through 310 correspond to compress base layer 112 of FIG. 1A and to FIG. 1B, which shows details of element 112. As indicated at 304 of FIG. 4, the dynamic range of the input image may be estimated. As indicated at 306, highlights of B may be compressed according to a non-linear remapping function that provides space at the top of the intensity scale where the details and variations may be displayed. As indicated at 308 a function to control shadows of B may be applied. As indicated at 310, a function to control contrast of B may be applied.

As indicated at 312, the details D may be adjusted; for example D may be amplified to more clearly reveal the image details.

As indicated at 314, the compressed base layer B and adjusted detail layer D may be combined to generate the output luminance, L_(out). As indicated at 316, in some embodiments, the exposure of L_(out) may be adjusted to generate L_(exp). As indicated at 318, the color and luminance may be recombined to generate the output image. For example, L_(exp) may be multiplied by C to generate the output image.

FIG. 5—Example User Interface

FIG. 5 shows an example user interface to a tone mapping module that implements a method for tone mapping HDR images as described in FIGS. 1A through 4. Some embodiments may provide a user interface that includes user interface elements via which a user may control one or more parameters of the tone mapping method. The user interface may provide one or more user interface elements to control one or more of the following parameters, and/or other parameters not listed here:

-   -   Glow extent and Glow strength: These two parameters affect the         bilateral filter and control the size and strength of the glows         (a.k.a. halos) that may be visible around contrasted edges.     -   Contrast: controls the dynamic range of the output, that is, the         difference of the brightest and darkest points.     -   Detail: controls the amplitude of the texture.     -   Exposure: globally scales up or down the image intensities.     -   Shadow: brightens or darkens the dark regions of the images.     -   Highlight: brightens or darkens the bright regions of the         images.     -   Saturation: controls the saturation of the colors.

Some embodiments may also include a gamma control user interface element or elements and/or a vibrance control user interface element or elements as shown in FIG. 5. Some embodiments may also include one or more other user interface elements, such as a toning curve and histogram display as shown in FIG. 5, a menu whereby a user may select a set of previously specified default settings for the parameters (shown as “preset” in FIG. 5, where “custom” is currently selected), one or more standard dialog user interface elements such as the “OK” and “CANCEL” buttons shown in FIG. 5, and one or more checkboxes such as the “preview” checkbox shown in FIG. 5.

While FIG. 5 shows slider bars and/or text boxes that may be used to control and display the settings of various parameters, other types of user interface elements, such as dials, menus, and so on, may be used in various embodiments of the user interface.

In some embodiments, default values may be used for the various parameters that attempt to produce images that look as much as possible like normal photographs. However, via the user interface, users may modify one or more of the parameters, for example using the user interface elements shown in FIG. 5 such as slider bars, to obtain an “HDR look” (glowing edges, low contrast, and saturated colors) in images, for example by increasing the glow extent and glow strength, reducing the contrast, and increasing saturation and texture, or may modify one or more parameters to achieve various other desired visual effects.

Example Implementations

FIG. 6 illustrates a tone mapping module that may implement an embodiment of the method for tone mapping HDR images illustrated in FIGS. 1A through 4. FIG. 11 illustrates an example computer system on which embodiments of module 920 may be implemented. Module 920 receives as input an HDR image 910. Module 920 may receive user input 912 adjusting one or more of various parameters used in the tone mapping method as described herein. Module 920 performs the tone mapping method as described herein on the input HDR image 910, according to user input 912 received via user interface 922, if any, or according to default values if user input 912 does not specify other values. Module 920 generates as output an image 930 that has a more limited dynamic range than the input HDR image, and that may approximate the appearance of an HDR image. Image 930 may be formatted according to an image format via which the image 930 may be displayed on a display device and/or printed to a printer. Output image 930 may, for example, be stored to a storage medium 940, such as system memory, a disk drive, DVD, CD, etc., displayed on a display device, printed via a printer, etc. Note that input HDR image 910 may also be stored to a storage medium 940, but typically cannot be directly displayed to a display device or printed to a printer.

In some embodiments, module 920 may provide a user interface 922 via which a user may interact with the module 920, for example to adjust one or more of various parameters used in the tone mapping method as described herein. In some embodiments, the user interface may provide user interface elements whereby the user may adjust parameters including, but not limited to, glow extent, glow strength, contrast, gamma, detail (texture), exposure, shadow, highlight, vibrance, and saturation. FIG. 5 shows an example user interface that may be used in some embodiments.

Tone Mapping Workflow

FIGS. 1A through 6 illustrate embodiments of a tone mapping technique that may be applied to high dynamic range (HDR) images to generate output at lower dynamic ranges used by various output media, such as printers and display devices. This section further describes a workflow that may be implemented in applying the tone mapping technique to HDR images, according to at least some embodiments.

FIGS. 7A through 7C illustrate an example workflow for applying the tone mapping technique as illustrated in FIGS. 1A through 6 to an input HDR image, according to at least some embodiments. FIG. 9 shows an example user interface (UI) to a tone mapping module that implements an embodiment of the tone mapping technique. The UI shown in FIG. 9 may be employed in performing the tone mapping workflow as illustrated in FIGS. 7A through 7C to generate lower dynamic range output from input HDR images. An example tone mapping module is illustrated in FIG. 6. An example system on which a tone mapping module and UI to the tone mapping module may be implemented is illustrated in FIG. 11.

FIG. 7A is a high-level flowchart of the tone mapping workflow, according to at least some embodiments. As indicated at 400, the tone mapping module may obtain input indicating a high dynamic range (HDR) image to be tone mapped according to a tone mapping technique implemented by the module. For example, a user, via a UI to the tone mapping module such as the UI illustrated in FIG. 9, may select or otherwise specify an input HDR image (or images) to be tone mapped. Note that an HDR image generally cannot be displayed on a display device in raw form.

As indicated at 402 of FIG. 7A, the tone mapping module may obtain values for a plurality of parameters of the tone mapping technique. In at least some embodiments, default values may be provided for the parameters. In at least some embodiments, a user, via one or more user interface elements (e.g., slider bars, text entry boxes, etc.) provided by a UI to the tone mapping module such as the UI illustrated in FIG. 9, may modify or adjust one or more of the parameter values. FIG. 5, which provides an example of a HDR conversion UI 510 element as illustrated in FIG. 9, shows examples of several such user interface elements. As shown in FIGS. 5 and 9, the user interface elements may be used to control one or more of the following parameters of the tone mapping technique, and/or other parameters not listed here:

-   -   Edge glow (Glow extent and Glow strength/amplitude) parameters:         These parameters affect the bilateral filter used to decomposing         the luminance component of the HDR image into a base layer and a         detail layer, and control the size and strength (or amplitude)         of the glows (a.k.a. halos) that may be visible around         contrasted edges. These parameters may be referred to as a space         parameter that controls extent of glow visible around contrasted         edges and a range parameter that controls amplitude of glow         visible around contrasted edges.     -   Tone and detail parameters:     -   Contrast parameter: controls the dynamic range of the output,         that is, the difference of the brightest and darkest points. The         contrast parameter may be used after compressing the base layer         when applying a function to control contrast in the compressed         base layer.     -   Detail parameter (texture scaling factor): controls the         amplitude of the texture when adjusting the detail layer.     -   Exposure parameter (exposure scaling factor): globally scales up         or down the image intensities. The exposure scaling factor may         be applied to the output luminance component (the combined         compressed base layer and adjusted detail layer) prior to         combining the color component and the output luminance component     -   Shadow parameter: brightens or darkens the dark regions of the         images. The shadow parameter may be used when applying a         remapping function to luminance values in the compressed base         layer to control darkness of shadows in the compressed base         layer.     -   Highlight parameter: brightens or darkens the bright regions of         the images. The highlight parameter may be used when applying a         nonlinear remapping function to the base layer to compress the         base layer to the lower portion of the lower dynamic range in         the compressed base layer     -   Saturation parameter: used to control the saturation of the         colors.

Some embodiments may also provide other parameters and associated control user interface elements, such as a gamma control parameter and user interface element and/or a vibrance control parameter and user interface element. Some embodiments may also include one or more other user interface elements, such as a toning curve and histogram display as shown in FIG. 5 and a menu or other user interface element whereby a user may select default settings for the parameters (shown as “preset” in FIG. 5, where “custom” is currently selected). In some embodiments, if the user has modified one or more of the settings for the parameters from the default settings, the user may select “default” in the “preset” menu to reset the values to the default settings. In at least some embodiments, changing one or more of the settings of the parameters on the UI may result in the “preset” menu changing to “custom”, as shown in FIG. 5.

As indicated at 404 of FIG. 7A, the tone mapping module may apply the tone mapping technique to the HDR image according to the current settings of the plurality of parameters to generate output at a lower dynamic range of a target output medium. The current settings may be either the default settings or custom settings as selected by the user via the user interface. FIGS. 7B and 7C illustrate an example embodiment of the tone mapping technique that may be applied at element 402 of FIG. 7A in more detail.

In some embodiments the output may be generated by combining the compressed base layer, the detail layer, and the color component to generate a tone-mapped output image, as previously described (see, e.g., the sections Combining Base and Detail Layers, Adjusting the Exposure, and Putting Back the Color). In some embodiments, the HDR conversion UI 510 as illustrated in FIG. 9 may close after the tone-mapped output image is generated.

In at least some embodiments, the user interface may provide a user interface element such as a button or menu option that, when selected, causes the output to be generated as a new layer using the current parameter settings, while keeping the HDR conversion UI 510 as illustrated in FIG. 9 open. This user interface element is shown as create layer 520 in FIG. 9. This allows the user to generate several versions of the tone-mapped output image as separate layers in the user interface; the user may later merge or combine two or more of the tone-mapped images, for example using layer masks or other tools or techniques provided by the image processing application.

In at least some embodiments, the user interface may provide a user interface element such as a button or menu option that allows the user to output the base layer, the detail layer, and the color component as separate layers. This user interface element is shown as output as component layers 522 in FIG. 9. When this user interface element is selected, the HDR conversion UI 510 as illustrated in FIG. 9 may close after the tone mapping output is generated. However, instead of generating a tone-mapped image as output by combining the compressed base layer, the detail layer, and the color component, the generated output comprises the compressed base layer, the adjusted detail layer, and the color component each displayed or accessible as a separate layer, for example in a user interface as illustrated in FIG. 10. In some embodiments, the component layers may be stacked, with the base layer on bottom, and next the detail layer, with the color layer on top. In some embodiments, the blending mode for the base layer may be set to “normal,” the blending mode for the detail layer may be set to “multiply,” and the blending mode for the color layer may be set to “color.” In some embodiments, the base and detail layers may be gamma-corrected. The user may then apply one or more image processing tools or techniques provided by the image processing application to one or more of the layers separately, as desired, to thus modify one or more of the layers in the stack. The user may also apply image processing tools or techniques to the layer stack, for example adding or inserting other layers in the layer stack, adding layer masks, selecting layers, and so on. The user may then generate a final output tone-mapped image by merging the separately adjusted component layers (and one or more other layers, if added), if desired. An advantage of producing the separate layers as output of the tone mapping technique as an alternative to a tone-mapped image as output is that the user can process each layer of the tone mapped image separately using any tool provided by the image processing application, thereby being able to creatively modify the output of the tone mapping technique in a wide variety of ways.

As indicated at 406 of FIG. 7A, the output may be displayed on a display device. As described above, the displayed output may be a tone-mapped output image, two or more layers each representing a separate output image, or the compressed base layer, the adjusted detail layer, and the color layer each displayed or accessible as a separate layer. FIG. 9 shows example displayed output as image or layer(s) 504 displayed in layer/image display pane 502 of window 500.

At 408 of FIG. 7A, the user may determine if the displayed results are satisfactory and may return to 402 to modify the values of one or more of the parameters and reapply the tone mapping technique to the input HDR image if necessary or desired. Otherwise, the tone mapping of the HDR image may be done. The final output may be stored to a storage device, sent to a printer, and/or further processed using one or more other image processing techniques as necessary or desired.

While the above describes a workflow, module, technique, and user interface for tone mapping an HDR image, in at least some embodiments a set of HDR image files may be batch processed to generate a corresponding set of tone-mapped output images. For example, the user interface may provide one or more user interface elements that allow a user to specify or select a set of HDR image files (e.g., a folder or directory, or a subset of HDR image files in a directory) to be batch processed according to the tone mapping technique. The user may select, via the user interface, the parameter values to be applied in the tone mapping technique during batch processing. For example, the user may specify that the default parameter values are to be used, or may change the settings for one or more of the parameters. The user interface may also provide a user interface element (e.g., a button or menu item) that allows the user to initiate batch processing of the selected set of HDR image files by the tone mapping module. The tone mapping module then applies the tone mapping technique to each of the selected HDR image files according to the selected parameter settings.

FIG. 7B illustrates an example tone mapping technique that may be applied at element 402 of FIG. 7A, according to some embodiments. The tone mapping technique may be applied to an input HDR image according to the current parameter settings to generate output at a lower dynamic range of an output medium. As indicated at 420, the HDR image may be separated into a luminance component and a color component. The section titled Color-Luminance Separation describes a technique that may be applied at 420, according to at least some embodiments.

As indicated at 422 of FIG. 7B, the luminance component may be decomposed into a base layer and a detail layer according to one or more of the parameters. In at least some embodiments, the luminance component may be decomposed by applying a bilateral filter to the luminance component. The one or more parameters may include a space parameter that controls extent of glow visible around contrasted edges and a range parameter that controls amplitude of glow visible around contrasted edges. The section titled Base-Detail Separation describes a technique that may be applied at 422, according to at least some embodiments.

As indicated at 424 of FIG. 7B, the base layer may be compressed to a lower portion of the lower dynamic range according to one or more of the parameters to generate a compressed base layer. An upper portion of the lower dynamic range in the compressed base layer is left for the detail layer. FIG. 7C illustrates an example embodiment of a compression technique that may be applied at element 424 of FIG. 7B in more detail.

As indicated at 426 of FIG. 7B, luminance values in the detail layer may be adjusted according to one or more of the parameters to control the amount of details visible in the image. For example the detail layer may be amplified to more clearly reveal the image details. In at least some embodiments, adjusting the detail layer may be performed by applying a texture scaling factor to the detail layer. The section titled Adjusting the Detail Layer describes a technique that may be applied at element 426, according to at least some embodiments.

At 428 of FIG. 7B, the user may choose to combine the compressed base layer, the detail layer, and the color component to generate an output image. If the user chooses to combine the components into an output image at 428, then, as indicated at 430, the compressed base layer, the detail layer, and the color component may be combined to generate the output image at the lower dynamic range of the output medium. To accomplish this, in some embodiments, the detail layer may be combined with the compressed base layer to generate an output luminance component scaled according to the lower dynamic range. Luminance values of the compressed base layer are in the lower portion of the lower dynamic range of the output luminance component and luminance values of the detail layer are in the upper portion of the lower dynamic range of the output luminance component. The section titled Combining Base and Detail Layers describes a technique that may be applied to combine the base and detail layers, according to at least some embodiments. In some embodiments, exposure may be adjusted in the output luminance component according to one or more of the parameters. In some embodiments, exposure may be adjusted by applying an exposure scaling factor to the output luminance component. The output luminance component and the color component may then be combined to generate the output at the lower dynamic range of the output medium. The section titled Putting Back the Color describes a technique that may be applied to combine the output luminance component and the color component, according to at least some embodiments.

At 428, as an alternative to combining the compressed base layer, the detail layer, and the color component in the manner described, the compressed base layer, the detail layer, and the color component may optionally be output and displayed as separate layers. This, for example, may allow the user to independently modify one or more of the layers to achieve a desired effect or look in a final output image. If the user chooses to output the component layers as separate layers at 428, then the layers may be output as separate layers, as indicated at 432. At 434, the user may choose to modify one or more of the layers; in response, a user interface may be displayed that includes one or more of the compressed base layer, the detail layer, and the color component as separate layers. The user interface may also provide user interface elements for applying various image processing tools and techniques to the layer(s). In some embodiments, the component layers may be stacked, with the base layer on bottom, and next the detail layer, with the color layer on top. In some embodiments, the blending mode for the base layer may be set to “normal,” the blending mode for the detail layer may be set to “multiply,” and the blending mode for the color layer may be set to “color.” In some embodiments, the base and detail layers may be gamma-corrected to obtain a correct final image. As indicated at 436, user input may be received to modify one of the layers according to one or more of the image processing tools or techniques. The user may apply one or more image processing tools or techniques provided by the image processing application via the user interface to one or more of the layers separately, as desired, to modify one or more of the layers. The user may also apply other image processing tools or techniques to the layers, for example adding or inserting other layers in the layer stack, adding layer masks, and so on. As indicated by the dashed arrow line returning to 436, the user may continue to apply different tools or techniques to selected ones of the layers and/or to the layer stack until a desired result is obtained. As indicated at 438, the modified layers in the layer stack may be output. A final output image may be generated by merging the separately adjusted component layers (and one or more other layers, if added), if desired. An advantage of producing the separate layers as output of the tone mapping technique is that the user can process each layer of the tone mapped image separately using any tool provided by the image processing application, thereby being able to creatively modify the output of the tone mapping technique in a wide variety of ways.

FIG. 7C illustrates an example technique for compressing the base layer that may be applied at element 424 of FIG. 7B in more detail, according to at least some embodiments. As indicated at 450, an estimate of the dynamic range of the HDR image may be generated. The estimate of the dynamic range of the HDR image indicates an amount to compress the base layer. See the section titled Estimating the Dynamic Range for a description of an example technique that may be applied at 450 to estimate the dynamic range, according to at least some embodiments.

As indicated at 452 of FIG. 7C, a nonlinear remapping function may be applied to the base layer according to a highlight parameter that controls brightness of highlight regions in the base layer to compress the base layer to the lower portion of the lower dynamic range in the compressed base layer. The nonlinear remapping function may compress luminance values of higher intensity more than luminance values of lower intensity. See the section titled Compressing Highlights for a description of an example nonlinear remapping function that may be applied at 452, according to at least some embodiments.

As indicated at 454 of FIG. 7C, a remapping function may be applied to luminance values in the compressed base layer according to a shadow parameter to control darkness of shadows in the compressed base layer. See the section titled Controlling Shadows for a description of an example remapping function that may be applied at 454, according to at least some embodiments.

As indicated at 456 of FIG. 7C, a function may be applied to luminance values in the compressed base layer according to a contrast parameter to control contrast in the compressed base layer. See the section titled Controlling the Contrast for a description of an example remapping function that may be applied at 456, according to at least some embodiments.

FIG. 8 is a flowchart of a method for displaying and modifying the component layers as separately output by the tone mapping technique, according to at least some embodiments. As indicated at 470, a high dynamic range (HDR) image may be decomposed into a base layer including large-scale variations in contrast, a detail layer including small-scale variations in contrast, and a color layer. As indicated at 472, tone mapping techniques as described herein may be applied to the base layer and detail layer to generate a compressed base layer. The detail layer may also be adjusted as previously described. In at least some embodiments, the base layer may be compressed to a lower portion of a dynamic range of an output medium to generate the compressed base layer. The compression technique leaves an upper portion of the dynamic range for the detail layer. As indicated at 474, the compressed base layer, the detail layer, and the color layer may be displayed as a layer stack in an interface of an image processing application. Examples of image processing applications include, but are not limited to, Adobe® PhotoShop® Adobe® PhotoShop® Elements®, and Adobe® After Effects®. Each layer in the layer stack is selectable via the interface to apply one or more of a plurality of image processing techniques to the selected layer. FIG. 10 shows an example user interface that may be used in some embodiments. As indicated at 476, the user may select a layer in the stack via the interface to apply one or more of a plurality of image processing techniques provided by the image processing application to the selected layer. At 478, if there are more modifications to be performed, then the method returns to 476, where the user may select another layer or apply other image processing techniques to the selected layer. While not shown, the user may perform other modifications to the stack, such as adding layers or layer masks and/or combining layers in the stack. As indicated at 480, when the user is done with the modifications, one or more of the layers from the layer stack may be output. While not shown, if the user so desires, the layers in the stack may be combined to generate an image at the dynamic range of the output medium. In at least some embodiments, the layers that were output at 480 may be persisted so that the user may perform additional modifications to one or more of the layers in the layer stack, and/or to otherwise modify the layer stack, and generate new images according to the additional modifications, if desired.

FIG. 9 shows an example user interface that may be used in performing the tone mapping workflow illustrated in FIGS. 7A through 7C, according to at least some embodiments, and is not intended to be limiting. A window 500 may include a layer/image display pane 502 and a HDR conversion UI 510 area. Alternatively, HDR conversion UI 510 may be displayed in a separate window. HDR conversion UI 510 may include edge glow parameter controls 512, tone and detail controls 514, advanced (e.g., vibrance and saturation) controls 516, and toning curve and histogram 518. FIG. 5 shows an example HDR conversion UI 510 element as illustrated in FIG. 9 in more detail. Image data to which the tone mapping technique is being applied may be displayed as image or layer(s) 504 in layer/image display pane 502.

In at least some embodiments, the user interface may provide a create layer 520 user interface element that, when selected, causes the output to be generated as a new layer using the current parameter settings, while keeping the HDR conversion UI 510 as illustrated in FIG. 9 open. This allows the user to generate several versions of the tone-mapped output image as separate layers in the user interface; the user may later merge or combine two or more of the tone-mapped images, for example using layer masks or other tools or techniques provided by the image processing application.

In at least some embodiments, the user interface may provide an output as component layers 522 user interface element that allows the user to output the base layer, the detail layer, and the color component as separate layers. When this user interface element is selected, the HDR conversion UI 510 as illustrated in FIG. 9 may close after the tone mapping output is generated. However, instead of generating a tone-mapped image as output by combining the compressed base layer, the detail layer, and the color component, the generated output comprises the compressed base layer, the adjusted detail layer, and the color component each displayed or accessible as a separate layer, for example in a user interface of an image processing application as illustrated in FIG. 10.

FIG. 10 shows an example user interface to an image processing application that may be used to display and modify the component layers as separately output by the tone mapping technique, according to at least some embodiments, and is not intended to be limiting. A window 600 may be provided as a user interface and may include a layer display pane 602 and layer editing tools 610 area. One or more of the component layers (base layer 604, details layer 606, and color layer 608) may be displayed in the layer display pane 602, for example in a layer stack 603. In some embodiments, the component layers may be stacked, with the base layer 604 on bottom, and next the detail layer 606, with the color layer 608 on top. In some embodiments, the blending mode for the base layer 604 may be set to “normal,” the blending mode for the detail layer 606 may be set to “multiply,” and the blending mode for the color layer 608 may be set to “color.” In some embodiments, the base layer 604 and/or detail layer 606 may be gamma-corrected. In some embodiments, additional layers may be displayed if the layers have been added to the layer stack.

Layer editing tools 610 may include user interface elements 612 for selecting and applying various image processing tools and techniques provided by the image processing application to selected ones of the one or more of the layers to thus separately modify one or more of the layers. These user interface elements 612 may include slider bars, buttons, dials, alphanumeric text entry boxes, menus, or in general any type of user interface element that may be used to apply various image processing tools and techniques to image data. Window 600 may include one or more user interface elements, e.g. select layer 624 user interface element, for selecting a current layer from layer stack 603 to which selected tools and techniques may be applied.

Window 600 may also include one or more user interface elements for selecting and applying image processing tools or techniques to the layer stack 603, for example an add layer 620 element for adding or inserting layers in the layer stack 603, an add mask 622 element for adding layer masks, a select layer 624 element for selecting a layer from the layer stack 603 for modification with selected image processing tools or techniques, a combine layer 626 element for combining two or more layers, an output layer(s) 628 element via which the user may choose to output and persist one or more of the layers or a combination of two or more of the layers, and so on.

Example System

Embodiments of a tone mapping workflow, module, technique, and user interface as described herein may be executed on one or more computer systems, which may interact with various other devices. One such computer system is illustrated by FIG. 11. In different embodiments, computer system 1000 may be any of various types of devices, including, but not limited to, a personal computer system, desktop computer, laptop, notebook, or netbook computer, mainframe computer system, handheld computer, workstation, network computer, a camera, a set top box, a mobile device, a consumer device, video game console, handheld video game device, application server, storage device, a peripheral device such as a switch, modem, router, or in general any type of computing or electronic device.

In the illustrated embodiment, computer system 1000 includes one or more processors 1010 coupled to a system memory 1020 via an input/output (I/O) interface 1030. Computer system 1000 further includes a network interface 1040 coupled to I/O interface 1030, and one or more input/output devices 1050, such as cursor control device 1060, keyboard 1070, and display(s) 1080. In some embodiments, it is contemplated that embodiments may be implemented using a single instance of computer system 1000, while in other embodiments multiple such systems, or multiple nodes making up computer system 1000, may be configured to host different portions or instances of embodiments. For example, in one embodiment some elements may be implemented via one or more nodes of computer system 1000 that are distinct from those nodes implementing other elements.

In various embodiments, computer system 1000 may be a uniprocessor system including one processor 1010, or a multiprocessor system including several processors 1010 (e.g., two, four, eight, or another suitable number). Processors 1010 may be any suitable processor capable of executing instructions. For example, in various embodiments, processors 1010 may be general-purpose or embedded processors implementing any of a variety of instruction set architectures (ISAs), such as the ×86, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of processors 1010 may commonly, but not necessarily, implement the same ISA.

In some embodiments, at least one processor 1010 may be a graphics processing unit. A graphics processing unit or GPU may be considered a dedicated graphics-rendering device for a personal computer, workstation, game console or other computing or electronic device. Modern GPUs may be very efficient at manipulating and displaying computer graphics, and their highly parallel structure may make them more effective than typical CPUs for a range of complex graphical algorithms. For example, a graphics processor may implement a number of graphics primitive operations in a way that makes executing them much faster than drawing directly to the screen with a host central processing unit (CPU). In various embodiments, the image processing methods disclosed herein may, at least in part, be implemented by program instructions configured for execution on one of, or parallel execution on two or more of, such GPUs. The GPU(s) may implement one or more application programmer interfaces (APIs) that permit programmers to invoke the functionality of the GPU(s). Suitable GPUs may be commercially available from vendors such as NVIDIA Corporation, ATI Technologies (AMD), and others.

System memory 1020 may be configured to store program instructions and/or data accessible by processor 1010. In various embodiments, system memory 1020 may be implemented using any suitable memory technology, such as static random access memory (SRAM), synchronous dynamic RAM (SDRAM), nonvolatile/Flash-type memory, or any other type of memory. In the illustrated embodiment, program instructions and data implementing desired functions, such as those described above for embodiments of a tone mapping module, technique, and user interface are shown stored within system memory 1020 as program instructions 1025 and data storage 1035, respectively. In other embodiments, program instructions and/or data may be received, sent or stored upon different types of computer-accessible media or on similar media separate from system memory 1020 or computer system 1000. Generally speaking, a computer-accessible medium may include computer-readable storage media or memory media such as magnetic or optical media, e.g., disk or CD/DVD-ROM coupled to computer system 1000 via I/O interface 1030. Program instructions and data stored via a computer-accessible medium may be transmitted by transmission media or signals such as electrical, electromagnetic, or digital signals, which may be conveyed via a communication medium such as a network and/or a wireless link, such as may be implemented via network interface 1040.

In one embodiment, I/O interface 1030 may be configured to coordinate I/O traffic between processor 1010, system memory 1020, and any peripheral devices in the device, including network interface 1040 or other peripheral interfaces, such as input/output devices 1050. In some embodiments, I/O interface 1030 may perform any necessary protocol, timing or other data transformations to convert data signals from one component (e.g., system memory 1020) into a format suitable for use by another component (e.g., processor 1010). In some embodiments, I/O interface 1030 may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. In some embodiments, the function of I/O interface may be split into two or more separate components, such as a north bridge and a south bridge, for example. In addition, in some embodiments some or all of the functionality of I/O interface 1030, such as an interface to system memory 1020, may be incorporated directly into processor 1010.

Network interface 1040 may be configured to allow data to be exchanged between computer system 1000 and other devices attached to a network, such as other computer systems, or between nodes of computer system 1000. In various embodiments, network interface 1040 may support communication via wired or wireless general data networks, such as any suitable type of Ethernet network, for example; via telecommunications/telephony networks such as analog voice networks or digital fiber communications networks; via storage area networks such as Fibre Channel SANs, or via any other suitable type of network and/or protocol.

Input/output devices 1050 may, in some embodiments, include one or more display terminals, keyboards, keypads, touchpads, scanning devices, voice or optical recognition devices, or any other devices suitable for entering or retrieving data by one or more computer system 1000. Multiple input/output devices 1050 may be present in computer system 1000 or may be distributed on various nodes of computer system 1000. In some embodiments, similar input/output devices may be separate from computer system 1000 and may interact with one or more nodes of computer system 1000 through a wired or wireless connection, such as over network interface 1040.

As shown in FIG. 11, memory 1020 may include program instructions 1025, configured to implement embodiments of a tone mapping workflow, module, technique, and user interface as described herein, and data storage 1035, comprising various data accessible by program instructions 1025. In one embodiment, program instructions 1025 may include software elements of embodiments of a tone mapping module, technique, and user interface as illustrated in the above Figures. Data storage 1035 may include data that may be used in embodiments. In other embodiments, other or different software elements and data may be included.

Those skilled in the art will appreciate that computer system 1000 is merely illustrative and is not intended to limit the scope of a tone mapping workflow, module, technique, and user interface as described herein. In particular, the computer system and devices may include any combination of hardware or software that can perform the indicated functions, including a computer, personal computer system, desktop computer, laptop, notebook, or netbook computer, mainframe computer system, handheld computer, workstation, network computer, a camera, a set top box, a mobile device, network device, internet appliance, PDA, wireless phones, pagers, a consumer device, video game console, handheld video game device, application server, storage device, a peripheral device such as a switch, modem, router, or in general any type of computing or electronic device. Computer system 1000 may also be connected to other devices that are not illustrated, or instead may operate as a stand-alone system. In addition, the functionality provided by the illustrated components may in some embodiments be combined in fewer components or distributed in additional components. Similarly, in some embodiments, the functionality of some of the illustrated components may not be provided and/or other additional functionality may be available.

Those skilled in the art will also appreciate that, while various items are illustrated as being stored in memory or on storage while being used, these items or portions of them may be transferred between memory and other storage devices for purposes of memory management and data integrity. Alternatively, in other embodiments some or all of the software components may execute in memory on another device and communicate with the illustrated computer system via inter-computer communication. Some or all of the system components or data structures may also be stored (e.g., as instructions or structured data) on a computer-accessible medium or a portable article to be read by an appropriate drive, various examples of which are described above. In some embodiments, instructions stored on a computer-accessible medium separate from computer system 1000 may be transmitted to computer system 1000 via transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as a network and/or a wireless link. Various embodiments may further include receiving, sending or storing instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium. Accordingly, the present invention may be practiced with other computer system configurations.

CONCLUSION

Various embodiments may further include receiving, sending or storing instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium. Generally speaking, a computer-accessible medium may include computer-readable storage media or memory media such as magnetic or optical media, e.g., disk or DVD/CD-ROM, volatile or non-volatile media such as RAM (e.g. SDRAM, DDR, RDRAM, SRAM, etc.), ROM, etc. Program instructions and data stored via a computer-accessible medium may be transmitted by transmission media or signals such as electrical, electromagnetic, or digital signals, which may be conveyed via a communication medium such as a network and/or a wireless link.

The various methods as illustrated in the Figures and described herein represent example embodiments of methods. The methods may be implemented in software, hardware, or a combination thereof. The order of method may be changed, and various elements may be added, reordered, combined, omitted, modified, etc.

Various modifications and changes may be made as would be obvious to a person skilled in the art having the benefit of this disclosure. It is intended that the invention embrace all such modifications and changes and, accordingly, the above description to be regarded in an illustrative rather than a restrictive sense. 

What is claimed is:
 1. A method, comprising: performing, by a computing device: decomposing a high dynamic range (HDR) image into a base layer including large-scale variations in contrast, a detail layer including small-scale variations in contrast, and a color layer; compressing the base layer to a lower portion of a dynamic range of an output medium to generate a compressed base layer, said compressing is performed by applying a nonlinear remapping function to the base layer that compresses luminance values of higher intensity more than luminance values of lower intensity and leaves an upper portion of the dynamic range for the detail layer; and displaying the compressed base layer, the detail layer, and the color layer as a layer stack in an interface of an image processing application, each layer in the layer stack is selectable via the interface to apply one or more of a plurality of image processing techniques to the selected layer.
 2. The method as recited in claim 1, further comprising: receiving selection input via the interface selecting one of the layers in the layer stack; and applying one or more of the plurality of image processing techniques to the selected layer according to additional input to the interface.
 3. The method as recited in claim 1, further comprising combining the layers in the layer stack to generate an output image at the dynamic range of the output medium.
 4. The method as recited in claim 1, further comprising adjusting luminance values in the detail layer to generate an adjusted detail layer prior to said displaying, wherein the detail layer in the layer stack is the adjusted detail layer.
 5. The method as recited in claim 1, further comprising receiving input via the interface adding one or more additional layers to the layer stack or combining two or more layers in the layer stack.
 6. The method as recited in claim 1, further comprising receiving input via the interface adding a layer mask to a selected layer to the layer stack.
 7. The method as recited in claim 1, further comprising outputting the compressed base layer, the detail layer, and the color layer as separate layers.
 8. A system, comprising: at least one processor; a memory comprising program instructions, the program instructions are executable by the at least one processor to: decompose a high dynamic range (HDR) image into a base layer including large-scale variations in contrast, a detail layer including small-scale variations in contrast, and a color layer; compress the base layer to a lower portion of a dynamic range of an output medium to generate a compressed base layer, said compressing is performed by applying a nonlinear remapping function to the base layer that compresses luminance values of higher intensity more than luminance values of lower intensity and leaves an upper portion of the dynamic range for the detail layer; and display the compressed base layer, the detail layer, and the color layer as a layer stack in an interface of an image processing application, each layer in the layer stack is selectable via the interface to apply one or more of a plurality of image processing techniques to the selected layer.
 9. The system as recited in claim 8, wherein the program instructions are further executable by the at least one processor to: receive selection input via the interface selecting one of the layers in the layer stack; and apply one or more of the plurality of image processing techniques to the selected layer according to additional input to the interface.
 10. The system as recited in claim 8, wherein the program instructions are further executable by the at least one processor to combine the layers in the layer stack to generate an output image at the dynamic range of the output medium.
 11. The system as recited in claim 8, wherein the program instructions are further executable by the at least one processor to adjust luminance values in the detail layer to generate an adjusted detail layer prior to said displaying, wherein the detail layer in the layer stack is the adjusted detail layer.
 12. The system as recited in claim 8, wherein the program instructions are further executable by the at least one processor to receive input via the interface adding one or more additional layers to the layer stack or combining two or more layers in the layer stack.
 13. The system as recited in claim 8, wherein the program instructions are further executable by the at least one processor to receive input via the interface adding a layer mask to a selected layer to the layer stack.
 14. A non-transitory computer-readable storage medium storing program instructions, the program instructions are computer-executable to implement: decomposing a high dynamic range (HDR) image into a base layer including large-scale variations in contrast, a detail layer including small-scale variations in contrast, and a color layer; compressing the base layer to a lower portion of a dynamic range of an output medium to generate a compressed base layer, said compressing is performed by applying a nonlinear remapping function to the base layer that compresses luminance values of higher intensity more than luminance values of lower intensity and leaves an upper portion of the dynamic range for the detail layer; and displaying the compressed base layer, the detail layer, and the color layer as a layer stack in an interface of an image processing application, each layer in the layer stack is selectable via the interface to apply one or more of a plurality of image processing techniques to the selected layer.
 15. The non-transitory computer-readable storage medium as recited in claim 14, wherein the program instructions are further computer-executable to implement: receiving selection input via the interface selecting one of the layers in the layer stack; and applying one or more of the plurality of image processing techniques to the selected layer according to additional input to the interface.
 16. The non-transitory computer-readable storage medium as recited in claim 14, wherein the program instructions are further computer-executable to implement combining the layers in the layer stack to generate an output image at the dynamic range of the output medium.
 17. The non-transitory computer-readable storage medium as recited in claim 14, wherein the program instructions are further computer-executable to implement adjusting luminance values in the detail layer to generate an adjusted detail layer prior to said displaying, wherein the detail layer in the layer stack is the adjusted detail layer.
 18. The non-transitory computer-readable storage medium as recited in claim 14, wherein the program instructions are further computer-executable to implement receiving input via the interface adding one or more additional layers to the layer stack, combining two or more layers in the layer stack, or adding a layer mask to a selected layer to the layer stack.
 19. The method as recited in claim 7, further comprising receiving input via the interface modifying one of the separate layers.
 20. The system as recited in claim 8, further comprising outputting the compressed base layer, the detail layer, and the color layer as separate layers.
 21. The non-transitory computer-readable storage medium as recited in claim 14, wherein the program instructions are further computer-executable to implement outputting the compressed base layer, the detail layer, and the color layer as separate layers. 